<style lang="scss" rel="stylesheet/scss" scoped>
  .iconfont{
    font-size: .9rem;
  }
  .head{
    position: relative;
    padding: 3rem 0 1rem;
    color: #0078c9;
    .title{
      font-weight: 500;
      line-height: 1.6rem;
      font-size: 1.6rem;
      display: block;
    }
    .hint{
      font-size: .75rem;
      color: #3393d4;
      line-height: 3rem;
    }
  }
  .icon-fanhui{
    /*position: fixed;
    top: 1rem;
    left: 1rem;*/
    margin-top: -3rem;
    margin-bottom: 2rem;
    color: #0078c9;
    display: block;
    font-size: 1rem;
  }
</style>
<template>
  <div class="head">
    <i class="iconfont icon-fanhui" @click="headBack"></i>
    <span class="title">{{ info.title }}</span>
    <span class="hint">{{ info.subhead }}</span>
  </div>
</template>
<script>
  export default {
    props:{
      info:Object,
      backCode:{
        type:String,
        default:'-1'
      }
    },
    data(){
      return{}
    },
    methods:{
      headBack(){
        if('-1' == this.backCode){
          this.$router.go(-1);
        }else if('login' == this.backCode){
          $jump.login(this);
        }else{
          this.$emit('back');
        }
      }
    }
  }
</script>
